<?php
namespace app\service;

class PachCreateHelper
{
	/**
	 * 马的8个方向
	 */
	public static $knightDir = [
		+0x0e, -0x12, -0x21, -0x1f, -0x0e, +0x12, +0x1f, +0x21
	];
	
	/**
	 * 马的每个方向对应的马腿位置
	 */
	public static $knightCheck = [
		-0x01, -0x01, -0x10, -0x10, +0x01, +0x01, +0x10, +0x10
	];
	
	/**
	 * 将（帅）的4个方向
	 */
	public static $kingDir = [
		-0x10, +0x01, +0x10, -0x01, 0, 0, 0, 0
	];
	
	/**
	 * 仕的4个方向
	 */
	public static $advisorDir = [
		-0x11, -0x0f, +0x11, +0x0f, 0, 0, 0, 0
	];
	
	/**
	 * 象的4个方向
	 */
	public static $bishopDir = [
		-0x22, -0x1e, +0x22, +0x1e, 0, 0, 0, 0
	];
	/**
	 * 4个方向对应的象眼位置
	 */
	public static $bishopCheck = [
		-0x11, -0x0f, +0x11, +0x0f, 0, 0, 0, 0
	];
	
	/**
	 * 车的4个方向
	 */
	public static $rookDir = [
		-0x01, -0x10, +0x01, +0x10, 0, 0, 0, 0
	];
	
	/**
	 * 炮的4个方向
	 */
	public static $cannonDir = [
		-0x01, -0x10, +0x01, +0x10, 0, 0, 0, 0
	];
	
	/**
	 * 兵（卒）的方向
	 * 站在红方的角度，红兵前进的方向，就是黑卒后退的方向。所以黑卒和红兵需要分开处理
	 */
	public static $pawnDir = [
		[-0x01, +0x01, -0x10, 0, 0, 0, 0, 0],
		[-0x01, +0x01, +0x10, 0, 0, 0, 0, 0]
	];
	
	/**
	 * 马在棋盘上的合理位置(棋盘所有位置)
	 */
	public static $knightPosition = [
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
		0, 0, 0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 0, 0,
		0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
	];
	
	/**
	 * 象在棋盘的位置
	 */
	public static $bishopPosition = [
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,		
	];
	
	/**
	 * 兵（卒）在棋盘上的合理位置
	 */
	public static $pawnPosition = [
		[	// 红兵
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		]
	];
	/**
	 * 每类棋子的位置特征值
	 */
	public static $positionMask = [
		2, 4, 16, 1, 1, 1, 8
	];
	
	/**
	 * 每类棋子的价值,顺序是将、仕、象、马、车、炮、卒、没有棋子
	 */
	public static $pieceValue = [
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		1000, 20, 20, 20, 20, 40, 40, 90, 90, 45, 45, 10, 10, 10, 10, 10,
		1000, 20, 20, 20, 20, 40, 40, 90, 90, 45, 45, 10, 10, 10, 10, 10
	];
	
	/**
	 * 每种棋子对应在位置分值数组中的下标值
	 */
	public static $pieceNumToType = [
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 6, 6, 6,
		0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 6, 6, 6
	];
	/**
	 * 位置分值数组
	 */
	public static $positionValues = [
		[	// 红方
			[	// 红帅
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
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
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 70, 80, 90, 80, 70, 80, 90, 80, 70, 0, 0, 0, 0,
			0, 0, 0, 80, 110, 125, 90, 70, 90, 125, 110, 80, 0, 0, 0, 0,
			0, 0, 0, 90, 100, 120, 125, 120, 125, 120, 100, 90, 0, 0, 0, 0,
			0, 0, 0, 90, 100, 120, 130, 110, 130, 120, 100, 90, 0, 0, 0, 0,
			0, 0, 0, 90, 110, 110, 120, 100, 120, 110, 110, 90, 0, 0, 0, 0,
			0, 0, 0, 90, 100, 100, 110, 100, 110, 100, 100, 90, 0, 0, 0, 0,
			0, 0, 0, 80, 90, 100, 100, 90, 100, 100, 90, 80, 0, 0, 0, 0,
			0, 0, 0, 80, 80, 90, 90, 80, 90, 90, 80, 80, 0, 0, 0, 0,
			0, 0, 0, 70, 75, 75, 70, 50, 70, 75, 75, 70, 0, 0, 0, 0,
			0, 0, 0, 60, 70, 75, 70, 60, 70, 75, 70, 60, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
			],
			[	// 红车
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 160, 170, 160, 150, 150, 150, 160, 170, 160, 0, 0, 0, 0,
			0, 0, 0, 170, 180, 170, 190, 250, 190, 170, 180, 170, 0, 0, 0, 0,
			0, 0, 0, 170, 190, 200, 220, 240, 220, 200, 190, 170, 0, 0, 0, 0,
			0, 0, 0, 180, 220, 210, 240, 250, 240, 210, 220, 180, 0, 0, 0, 0,
			0, 0, 0, 180, 220, 210, 240, 250, 240, 210, 220, 180, 0, 0, 0, 0,
			0, 0, 0, 180, 220, 210, 240, 250, 240, 210, 220, 180, 0, 0, 0, 0,
			0, 0, 0, 170, 190, 180, 220, 240, 220, 200, 190, 170, 0, 0, 0, 0,
			0, 0, 0, 170, 180, 170, 170, 160, 170, 170, 180, 170, 0, 0, 0, 0,
			0, 0, 0, 160, 170, 160, 160, 150, 160, 160, 170, 160, 0, 0, 0, 0,
			0, 0, 0, 150, 160, 150, 160, 150, 160, 150, 160, 150, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
			],
			[	// 红炮
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 125, 130, 100, 70, 60, 70, 100, 130, 125, 0, 0, 0, 0,
			0, 0, 0, 110, 125, 100, 70, 60, 70, 100, 125, 110, 0, 0, 0, 0,
			0, 0, 0, 100, 120, 90, 80, 80, 80, 90, 120, 100, 0, 0, 0, 0,
			0, 0, 0, 90, 110, 90, 110, 130, 110, 90, 110, 90, 0, 0, 0, 0,
			0, 0, 0, 90, 110, 90, 110, 130, 110, 90, 110, 90, 0, 0, 0, 0,
			0, 0, 0, 90, 110, 90, 110, 130, 110, 90, 110, 90, 0, 0, 0, 0,
			0, 0, 0, 90, 100, 90, 90, 110, 90, 90, 100, 90, 0, 0, 0, 0,
			0, 0, 0, 90, 100, 80, 80, 70, 80, 80, 100, 90, 0, 0, 0, 0,
			0, 0, 0, 80, 90, 80, 70, 65, 70, 80, 90, 80, 0, 0, 0, 0,
			0, 0, 0, 80, 90, 80, 70, 60, 70, 80, 90, 80, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
			],
			[	// 红兵
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 10, 10, 10, 20, 25, 20, 10, 10, 10, 0, 0, 0, 0,
			0, 0, 0, 25, 30, 40, 50, 60, 50, 40, 30, 25, 0, 0, 0, 0,
			0, 0, 0, 25, 30, 30, 40, 40, 40, 30, 30, 25, 0, 0, 0, 0,
			0, 0, 0, 20, 25, 25, 30, 30, 30, 25, 25, 30, 0, 0, 0, 0,
			0, 0, 0, 15, 20, 20, 20, 20, 20, 20, 20, 15, 0, 0, 0, 0,
			0, 0, 0, 10, 0, 15, 0, 15, 0, 15, 0, 10, 0, 0, 0, 0,
			0, 0, 0, 10, 0, 10, 0, 15, 0, 10, 0, 10, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
			]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 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
			],
			[	// 黑马
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 60, 70, 75, 70, 60, 70, 75, 70, 60, 0, 0, 0, 0,
			0, 0, 0, 70, 75, 75, 70, 50, 70, 75, 75, 70, 0, 0, 0, 0,
			0, 0, 0, 80, 80, 90, 90, 80, 90, 90, 80, 80, 0, 0, 0, 0,
			0, 0, 0, 80, 90, 100, 100, 90, 100, 100, 90, 80, 0, 0, 0, 0,
			0, 0, 0, 90, 100, 100, 110, 100, 110, 100, 100, 90, 0, 0, 0, 0,
			0, 0, 0, 90, 110, 110, 120, 100, 120, 110, 110, 90, 0, 0, 0, 0,
			0, 0, 0, 90, 100, 120, 130, 110, 130, 120, 100, 90, 0, 0, 0, 0,
			0, 0, 0, 90, 100, 120, 125, 120, 125, 120, 100, 90, 0, 0, 0, 0,
			0, 0, 0, 80, 110, 125, 90, 70, 90, 125, 110, 80, 0, 0, 0, 0,
			0, 0, 0, 70, 80, 90, 80, 70, 80, 90, 80, 70, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
			],
			[	// 黑车
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 150, 160, 150, 160, 150, 160, 150, 160, 150, 0, 0, 0, 0,
			0, 0, 0, 160, 170, 160, 160, 150, 160, 160, 170, 160, 0, 0, 0, 0,
			0, 0, 0, 170, 180, 170, 170, 160, 170, 170, 180, 170, 0, 0, 0, 0,
			0, 0, 0, 170, 190, 180, 220, 240, 220, 200, 190, 170, 0, 0, 0, 0,
			0, 0, 0, 180, 220, 210, 240, 250, 240, 210, 220, 180, 0, 0, 0, 0,
			0, 0, 0, 180, 220, 210, 240, 250, 240, 210, 220, 180, 0, 0, 0, 0,
			0, 0, 0, 180, 220, 210, 240, 250, 240, 210, 220, 180, 0, 0, 0, 0,
			0, 0, 0, 170, 190, 200, 220, 240, 220, 200, 190, 170, 0, 0, 0, 0,
			0, 0, 0, 170, 180, 170, 190, 250, 190, 170, 180, 170, 0, 0, 0, 0,
			0, 0, 0, 160, 170, 160, 150, 150, 150, 160, 170, 160, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
			],
			[	// 黑炮
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 80, 90, 80, 70, 60, 70, 80, 90, 80, 0, 0, 0, 0,
			0, 0, 0, 80, 90, 80, 70, 65, 70, 80, 90, 80, 0, 0, 0, 0,
			0, 0, 0, 90, 100, 80, 80, 70, 80, 80, 100, 90, 0, 0, 0, 0,
			0, 0, 0, 90, 100, 90, 90, 110, 90, 90, 100, 90, 0, 0, 0, 0,
			0, 0, 0, 90, 110, 90, 110, 130, 110, 90, 110, 90, 0, 0, 0, 0,
			0, 0, 0, 90, 110, 90, 110, 130, 110, 90, 110, 90, 0, 0, 0, 0,
			0, 0, 0, 90, 110, 90, 110, 130, 110, 90, 110, 90, 0, 0, 0, 0,
			0, 0, 0, 100, 120, 90, 80, 80, 80, 90, 120, 100, 0, 0, 0, 0,
			0, 0, 0, 110, 125, 100, 70, 60, 70, 100, 125, 110, 0, 0, 0, 0,
			0, 0, 0, 125, 130, 100, 70, 60, 70, 100, 130, 125, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
			],
			[	// 黑卒
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 10, 0, 10, 0, 15, 0, 10, 0, 10, 0, 0, 0, 0,
			0, 0, 0, 10, 0, 15, 0, 15, 0, 15, 0, 10, 0, 0, 0, 0,
			0, 0, 0, 15, 20, 20, 20, 20, 20, 20, 20, 15, 0, 0, 0, 0,
			0, 0, 0, 20, 25, 25, 30, 30, 30, 25, 25, 30, 0, 0, 0, 0,
			0, 0, 0, 25, 30, 30, 40, 40, 40, 30, 30, 25, 0, 0, 0, 0,
			0, 0, 0, 25, 30, 40, 50, 60, 50, 40, 30, 25, 0, 0, 0, 0,
			0, 0, 0, 10, 10, 10, 20, 25, 20, 10, 10, 10, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
			]
		]
	];
}